package cn.tedu.csmall.server.pojo.dto;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author lixin
 * @Date 2022/8/27
 * 添加类别
 */
public class CategoryAddNewDTO implements Serializable {
    /**
     * 父级类别
     */
    private Long parentId;
    /**
     * 类别名称
     */
    private String name;
    /**
     * 自定义排序序号
     */
    private Integer sort;
    /**
     * 是否启用 1启用 0不启用
     */
    private Integer enable;
    /**
     *是否显示在导航 1 显示 0不显示
     */
    private Integer isDisplay;
    /**
     * 图标url
     */
    private String icon;
    /**
     * 关键词列表，各关键词使用英文逗号分隔
     */
    private String keywords;

    @Override
    public String toString() {
        return "CategoryAddNewDTO{" +
                "parentId=" + parentId +
                ", name='" + name + '\'' +
                ", sort=" + sort +
                ", enable=" + enable +
                ", isDisplay=" + isDisplay +
                ", icon='" + icon + '\'' +
                ", keywords='" + keywords + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CategoryAddNewDTO that = (CategoryAddNewDTO) o;
        return Objects.equals(parentId, that.parentId) &&
                Objects.equals(name, that.name) &&
                Objects.equals(sort, that.sort) &&
                Objects.equals(enable, that.enable) &&
                Objects.equals(isDisplay, that.isDisplay) &&
                Objects.equals(icon, that.icon) &&
                Objects.equals(keywords, that.keywords);
    }

    @Override
    public int hashCode() {
        return Objects.hash(parentId, name, sort, enable, isDisplay, icon, keywords);
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public Integer getIsDisplay() {
        return isDisplay;
    }

    public void setIsDisplay(Integer isDisplay) {
        this.isDisplay = isDisplay;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }
}
